home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / lfs / lfsStableMem.h < prev    next >
C/C++ Source or Header  |  1990-10-19  |  2KB  |  64 lines

  1. /*
  2.  * lfsStableMem.h --
  3.  *
  4.  *    Declarations of interface for maintaining the in memory data structures
  5.  *    of LFS.
  6.  *
  7.  * Copyright 1989 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /sprite/src/kernel/lfs/RCS/lfsStableMem.h,v 1.4 90/10/19 17:23:10 mendel Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _LFSSTABLEMEM
  20. #define _LFSSTABLEMEM
  21.  
  22. /* constants */
  23.  
  24. /* data structures */
  25.  
  26. /*
  27.  * LfsStableMemCheckPoint - data values written at stable memory checkpoints.
  28.  */
  29. typedef struct LfsStableMemCheckPoint {
  30.     int    numBlocks;    /* Number of block pointers written in this 
  31.              * checkpoint. */
  32. } LfsStableMemCheckPoint;
  33.  
  34. /*
  35.  * LfsStableMemParams - Configuration parameters for stable memory data
  36.  *            structures
  37.  */
  38. typedef struct LfsStableMemParams {
  39.     int    memType;    /* Stable memory type */
  40.     int blockSize;    /* Block size in bytes for index.  Must be
  41.              * a multiple of the file system block size. */
  42.     int entrySize;    /* Size of each entry in bytes. */
  43.     int    maxNumEntries;    /* Maximum number of entries supported. */
  44.     int    entriesPerBlock; /* Number of entries per block. */
  45.     int maxNumBlocks;    /* Maximum number of blocks supported by this
  46.              * index. */
  47. } LfsStableMemParams;
  48.  
  49.  
  50. /*
  51.  * An on disk header for each stable memory block.
  52.  */
  53. typedef struct LfsStableMemBlockHdr {
  54.     int    magic;        /* Better be LFS_STABLE_MEM_BLOCK_MAGIC. */
  55.     int    memType;    /* Memory type from params of this block. */
  56.     int    blockNum;    /* Block number in stable memory of this block. */
  57.     int    reserved;    /* Reserved must be zero. */
  58. } LfsStableMemBlockHdr;
  59.  
  60. #define    LFS_STABLE_MEM_BLOCK_MAGIC    0x1f55da
  61.  
  62. #endif /* _LFSSTABLEMEM */
  63.  
  64.